<extend name="Public/Common/base.html" />
<block name="main"> <css href="__PUBLIC__/assets/css/tp.css" />
<js href="__PUBLIC__/layer/layer.js" /> <css
	href="__PUBLIC__/assets/css/amazeui.datetimepicker.css" /> <js
	href="__PUBLIC__/assets/js/amazeui.datetimepicker.min.js" /> <js
	href="__PUBLIC__/assets/js/jquery.min.js" /> <js
	href="__PUBLIC__/assets/js/app.js" />
<style>
.am-table {
	font-size: 13px;
}

.am-time {
	width: 60%;
	height: 30px;
}
</style>
<div class="am-g">

	<form class="am-form">
		<div class="am-form-group am-u-sm-6 am-u-end">
			<label for="doc-select-1">选择月份:</label> <select id="getid"
				name="getid" required onchange="select()">
				<option value="{$month}" selected>{$month}月</option>
				<volist name="monthlist" id="vo">
				<option value="{$vo.id}">{$vo.month}月</option>
				</volist>
			</select> <span class="am-form-caret"></span> <input id="tex" type="hidden"
				name="tex" value="">
		</div>
	</form>
	<form class="am-form">
		<div class="am-u-sm-6 am-u-end">
			<label for="doc-select-1">收搜关键词:</label>
			<div class="am-input-group">
				<input type="text" id="search" name="search" class="am-form-field"
					placeholder="请输入姓名"
					onkeyup="this.value=this.value.replace(/[, ]/g,'')"> <span
					class="am-input-group-btn" onclick="search()">
					<button class="am-btn am-btn-default">
						<span class="am-icon-search"></span>
					</button>
				</span>
			</div>
		</div>
	</form>
</div>

<div class="am-scrollable-horizontal">
	<form action="{:U('Task/plsalary')}" method="post">
		<table
			class="am-table am-table-compact am-table-centered am-scrollable-horizontal am-text-nowrap   am-table-bordered">
			<thead>
			<tr >
			<th  colspan="10">
			{$year}年{$month}月
			</th>		
			<th colspan="1" class="noExl">
			<if condition="$tasklist EQ $null">			
			<button type="button" onclick="copya()"
				class="am-btn am-btn-warning am-btn-xs">批量删除</button>			
			<else />						
			<button type="button" onclick="copy()"
				class="am-btn am-btn-warning am-btn-xs">批量删除</button>
			</if>
			</th>			
		   	</tr>			
				<tr>
					<th><input type="checkbox" id="selectall" value=""></th>
					<th>id</th>
					<th>姓名</th>
					<th>出差时间</th>
					<th>出差任务</th>
					<th>回来时间</th>
					<th>回来原因</th>				
					<th>出差天数</th>
					<th>加班天数</th>			
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<if condition="$tasklist EQ $null">
				<tr >
			    <td colspan="11">
				<span style="color:red;">暂无记录</span>	
				<td>
			   </tr> 							
				<else/>							
				<volist name="tasklist" id="vv">													
				<tr>
					<td><input type="checkbox" name="select[]" class="cq"
						value="{$vv.id}"></td>
					<td >{$key+1}</td>
					<td>{$vv.staff_name}</td>
					<td>
						{$vv.taskstarttime}
					</td>
					<td>
						{$vv.taskinfo}
					</td>
					<td>
						<if condition="$vv.taskendtime eq '0000-00-00 00:00:00'">不确定<else />{$vv.taskendtime}</if>						
					</td>
					<td>
					<if condition="$vv.taskendtime eq '0000-00-00 00:00:00'">不确定<else />{$vv.taskbackinfo}</if>									
					</td>
				
					<td>
						<if condition="$vv.taskdate eq '0'">0天<else />{$vv.taskdate}天</if>
					</td>
					<td>
						<if condition="$vv.taskadd eq '0'">0天<else />{$vv.taskadd}天</if>
					</td>

					<td>
						<if condition="$vv.taskstatus eq '2'">出差中<else />出差完毕</if> 
					</td>
					<td>
				
				  <if condition="$vv.taskstatus eq '2'">
			     	
			         <a class="am-btn am-btn-primary am-btn-xs " href="{:U('Task/editt?id='.$vv['id'])}">编辑</a>		
			         <a class="am-btn am-btn-success am-btn-xs" href="{:U('Task/edit?id='.$vv['id'])}"> 合计出差 </a>					 					
					<!-- <a class="am-btn am-btn-warning am-btn-xs " onclick='return del("{$vv.id}")'> 删除 </a> -->							 
					<else />
					 <a class="am-btn am-btn-primary am-btn-xs " href="{:U('Task/editt?id='.$vv['id'])}">编辑</a>
					  <button class="am-btn am-btn-success am-btn-xs am-disabled">合计完毕</button>
					<!--  <a class="am-btn am-btn-warning am-btn-xs" onclick='return del("{$vv.id}")'>删除</a> -->
				  </if> 										
				 </td>
				</tr>
				 </volist>
             </if>
			</tbody>
		</table>
			
	</form>
</div>


<div class="am-g am-text-center">
	{$page}
</div>
<div class="am-g">
	<a href="{:U('Task/add')}">
		<button class="am-btn am-btn-primary am-btn-sm ">{$info}</button>
	</a><!--  <a href="{:U('Task/adda')}">
		<button class="am-btn am-btn-danger am-btn-sm am-fr">添加本月不出差人员</button>
	</a> -->
</div>
<js href="__PUBLIC__/assets/js/jquery14.js" /> 
<script type="text/javascript"> 
$(function(){ 
$("#selectall").click(function() { 
 var flag = $(this).attr("checked"); 					
  $("[name=select[]]:checkbox").each(function(){
	  $(this).attr("checked", flag);
	  });
});	 
});	
function sure(){
	var r=confirm("你确定要批量计算吗");	
	 if (r==true)
	    {		
		 return true;							 	 
	    }
	  else
	    {
     return false;
	   }		
}

</script> </block>
